home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 27 / CU Amiga Magazine's Super CD-ROM 27 (1998)(EMAP Images)(GB)[!][issue 1998-10].iso / CUCD / Programming / JForth / Extras / ODE / bench_ode < prev    next >
Encoding:
Text File  |  1991-10-24  |  2.1 KB  |  116 lines

  1. \ Benchmarks for ODE
  2. \
  3. \ Records of results:
  4. \
  5. \ LATE BINDING
  6. \  Original form 9/8/87
  7. \    100,000 of BENCH.LATE took 12.06 seconds
  8. \    100,000 of BENCH.LATE took 22.64 seconds with OB-IF-CHECK-BIND ON
  9. \  tried preshifting method index
  10. \    100,000 of BENCH.LATE took  9.88 seconds
  11. \  tried setting MAX-INLINE high for OB.BIND.RUN
  12. \    100,000 of BENCH.LATE took  8.72 seconds
  13.  
  14. \ 7/26/88
  15. \ LATE BINDING
  16. \    100,000 BENCH.LATE took 12.76 sec.
  17. \    100,000 BENCH.LATE took 32.14 sec. with OB-IF-CHECK-BIND ON
  18. \    100,000 BENCH.LATE took 12.18 sec. with new OS.COPY and OS.PUSH
  19. \    "" took 9.22 sec. plus new OB.BIND.RUN
  20. \    "" took 9.22 sec. plus new OB.BIND.RUN + OB-IF-CHECK-BIND ON
  21. \    "" took 7.88 sec. with ALITERAL in OBJECT DOES>
  22. \    ""
  23.  
  24. \
  25. \ IVARS
  26. \    100,000 BENCH.IVARS took 14.24 sec. and 14.04 sec.
  27. \    100,000 BENCH.IVARS took 14.02 sec. with OB-IF-CHECK-BIND ON
  28. \    100,000 BENCH.IVARS took  8.56 sec. new OS.COPY
  29. \
  30. \ SELF
  31. \    100,000 BENCH.SELF took 14.58 sec.
  32. \    100,000 BENCH.SELF took  9.10 sec. with new os.copy
  33.  
  34. \ ADD
  35. \     10,000 BENCH.ADD took 64.25 sec. with range checking.
  36. \     10,000 BENCH.ADD took 48.50 sec. withOUT range checking.
  37. \     10,000 BENCH.ADD took 36.14 sec. w/OUT checking, new os.copy
  38. \     10,000 BENCH.ADD took 34.82 sec. "" + ALITERAL in DOES>
  39.  
  40.  
  41. ANEW TASK-BENCH_ODE
  42.  
  43. METHOD NOOP:  ( for benchmarking binding )
  44. METHOD TIVARS:
  45. METHOD TSELF:
  46.  
  47. :CLASS TESTER <SUPER OBJECT
  48.     IV.LONG   IV-LONG1
  49.     IV.SHORT  IV-SHORT1
  50.     IV.USHORT IV-USHORT1
  51.  
  52. :M INIT:
  53.     init: super
  54.     237 iv=> iv-long1
  55.     -73 iv=> iv-short1
  56. ;M
  57.  
  58. :M TIVARS: ( -- )
  59.     iv-short1 iv=> iv-ushort1
  60. ;M
  61.  
  62. :M NOOP:
  63. ;M
  64.  
  65. :M TSELF:
  66.     tivars: self
  67. ;M
  68.  
  69. :M PRINT:
  70.     cr ." LONG1 = " IV-LONG1 . cr
  71.     ." SHORT1 = " IV-SHORT1 . cr
  72.     ." USHORT1 = " IV-USHORT1 . cr
  73. ;M
  74.  
  75. ;CLASS
  76.  
  77. TESTER TESTER-1
  78.  
  79. : TDO 0 DO LOOP ;
  80. : BENCH.LATE
  81.     0 DO tester-1 noop: []
  82.     LOOP
  83. ;
  84.  
  85. : BENCH.IVARS
  86.     0 DO tivars: tester-1
  87.     LOOP
  88. ;
  89.  
  90. : BENCH.SELF
  91.     0 DO tself: tester-1
  92.     LOOP
  93. ;
  94.  
  95. OB.ELMNTS ELM-1
  96.  
  97. : ELM.INIT
  98.     32 3 new: elm-1
  99. ;
  100.  
  101. : ELM.TERM
  102.     free: elm-1
  103. ;
  104.  
  105. if.forgotten elm.term
  106.  
  107. : BENCH.ADD ( N -- )
  108.     0 DO
  109.         empty: elm-1
  110.         8 0 DO
  111.             11 22 33 add: elm-1
  112.         LOOP
  113.     LOOP
  114. ;
  115.  
  116.